package fr.imag.ufrima.ctte.events;

import java.util.EventObject;

import fr.imag.ufrima.ctte.Operator;
import fr.imag.ufrima.ctte.Task;
import fr.imag.ufrima.ctte.TaskDiagram;

public class TaskDiagramEvent extends EventObject {
	private Task task;
	private Operator operator;
	public TaskDiagramEvent(Object source, Task task) {
		super(source);
		this.task = task;
		this.operator = null;
	}
	public TaskDiagramEvent(Object source, Operator operator) {
		super(source);
		this.operator = operator;
		this.task = null;		
	}
	public TaskDiagram getTaskDiagram(){
		return (TaskDiagram)source;
	}
	public Task getTask(){
		return task;
	}
	public Operator getOperator(){
		return operator;
	}

}
